package com.fresh.mapper;

import com.fresh.entity.RawOut;
import com.fresh.entity.RawOutQO;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface LingLiaoMapper {

    List<RawOut> findPageInfoByCondition(RawOutQO rawOutQO);

    @Insert("insert into raw_out values(#{roId},#{roNo},#{riName},#{riStorage},#{cgGname},#{roNum},#{cgNo},#{roIn},#{roEnd},1)")
    void insert(RawOut rawOut);

    @Update("update raw_out set ro_status = 3,ro_end = #{data} where ro_no = #{roNo}")
    void update(@Param("roNo") String roNo,@Param("data") String data);

    @Update("update raw_out set ro_status = 2,ro_end = #{data} where ro_no = #{roNo}")
    void changeStatus2ByRoNo(@Param("roNo") String roNo,@Param("data") String data);

}
